package com.by.bean.pucharse;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.util.List;

@Data
@ApiModel("采购单")
public class Purchase {

    @ApiModelProperty("id")
    int id;

    @ApiModelProperty(hidden = true)
    String code;

    @ApiModelProperty("制单日期")
    @NotBlank(message = "制单日期不能为空！")
    String billDate;

    @ApiModelProperty("供应商id")
    int supplierId;

    @ApiModelProperty("供应商名称")
    String supplierName;

    @ApiModelProperty("备注")
    String note;

    @ApiModelProperty("优惠率")
    double rate;

    @ApiModelProperty("优惠金额")
    double rateMoney;

    @ApiModelProperty("优惠后金额")
    double money;

    @ApiModelProperty("本次付款")
    double pay;

    @ApiModelProperty("结算账号id")
    int accountId;
    @ApiModelProperty("本次欠款")

    double debt;

    @ApiModelProperty("制单人")
    String prepared;

    @ApiModelProperty(hidden = true)
    String createTime;

    @ApiModelProperty(hidden = true)
    String updateTime;

    @ApiModelProperty("采购明细")
    List<PurchaseDetail> purchaseDetailList;

    @ApiModelProperty("合同")
    List<Contract> contracts;
}
